package com.jt.demo8_anno;

import org.springframework.stereotype.Component;

@Component//将对象交给Spring容器管理
          // key:tiger value:反射机制生成的对象
public class Tiger implements Pet{
    public Tiger() {
        System.out.println("老虎的无参构造~~~~~~~~~");
    }

    @Override
    public void hello() {
        System.out.println("哇哦！大脑斧！！");
    }
}
